<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

//判断是否是手机访问

if (ROUTE_MODULE == 'mobile'){
    //手机
//首页
    Route::get('/','mobile/index/index');
//关于我们
    Route::get('/aboutus/:id','mobile/aboutus/index');
    Route::get('/aboutus','mobile/aboutus/index');

//产品
    Route::get('/product/:id','mobile/product/detail');
    Route::get('/product','mobile/product/index');

//news
    Route::get('/news/:id','mobile/news/detail');
    Route::get('/news','mobile/news/index');

//服务
    Route::get('/services/:id','mobile/services/detail');
    Route::get('/services','mobile/services/index');

//知识
    Route::get('/know/:id','mobile/know/detail');
    Route::get('/know','mobile/know/index');

//采购
    Route::get('/purchase/:id','mobile/purchase/detail');
    Route::get('/purchase','mobile/purchase/index');
//留言
    Route::get('/message','mobile/message/index');
//联系我们
    Route::get('/contact','mobile/contact/index');
}else{
    //知识
    Route::get('/know/:id','home/know/detail');
    Route::get('/know','home/know/index');
//服务
    Route::get('/services/:id','home/services/detail');
    Route::get('/services','home/services/index');
//联系我们
    Route::get('/aboutus/:id','home/aboutus/index');
    Route::get('/aboutus','home/aboutus/index');

//采购
    Route::get('/purchase','home/purchase/index');

//产品
    Route::get('/product/:id','home/product/detail');
    Route::get('/product','home/product/index');
//新闻
    Route::get('/news/:id','home/news/detail');
    Route::get('/news','home/news/index');

    Route::get('/contact','home/contact/index');

    Route::get('/message','home/message/index');
    Route::get('/','home/index/index');
}






//Route::get('/:cid','home/index/index');
//Route::get('/','home/index/index');



return [
    //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
    '__alias__'   => [
    ],
    //变量规则
    '__pattern__' => [
    ],
//        域名绑定到模块
//        '__domain__'  => [
//            'admin' => 'admin',
//            'api'   => 'api',
//        ],
];
